package com.example.demo;

import com.example.demo.animals.Dog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2023-01-29
 * Time:14:08
 */
@RestController
public class Test {

    @Value("${Student}")
    private int s;

    @Autowired
    private Dog dog;

    private Logger logger= LoggerFactory.getLogger(Test.class);
    @RequestMapping("/aaa")
    public String Test(){
//        System.out.println(s);
//        return "aaa";
        logger.info("hi,info");
        return dog.getId()+":"+dog.getName()+":"+dog.getAge();
//        logger.info("hi,spring-info");
//        return "aaa";
    }
}
